package com.abc.bootbycustomloader;

import com.abc.bootbycustomloader.controller.UserController;
import com.abc.bootbycustomloader.loader.MyResourceLoader;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Conditional;
import org.springframework.core.io.ResourceLoader;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.Arrays;

@SpringBootApplication
public class ServerApplication {

	public static void main(String[] args) {


//		ConfigurableApplicationContext app = SpringApplication.run(ServerApplication.class, args);
//		ClassLoader cl = app.getClassLoader();
//		System.out.println(cl);

		SpringApplication app = new SpringApplicationBuilder().build();
		app.addPrimarySources(Arrays.asList(ServerApplication.class));
		app.setResourceLoader(new MyResourceLoader());
		ConfigurableApplicationContext context = app.run(args);




	}



}
